<template>
	<view>
		<u--input placeholder="请输入注册的电话号码" border="bottom" v-model="tel"></u--input>
		<u--input placeholder="请输入密码" border="bottom" v-model="passeord"></u--input>
		<view>
			<u-row customStyle="margin-bottom: 10px">
				<u-col span="6">
					<u-button text="注册" @click="register" type="primary"></u-button>
				</u-col>
				<u-col span="6">
					<u-button text="取消" @click="cancel" type="success"></u-button>
				</u-col>
			</u-row>
		</view>
		
		
	</view>
</template>

<script>
import loginVue from '../login.vue';
	export default {
		data() {
			return {
				user: {
					tel: "",
					passeord: ""
				}

			}
		},
		methods: {
			register() {
				let that = this;
				uni.request({
					url: "/api/",
					data: that.user,
					success(resp) {
                        if(resp.data.code=1){
							console.log(register)
							// 跳到
							// uni.switchTab({
							// 	url: '/pages/index/index'
							// });
						}
						
					}
				})
			}
		}
	}
</script>

<style>

</style>
